ds_map_create


描述

This function is used to create a new, empty, ds_map and will return its id which is then used to access the data structure in all other ds_map functions.

重要!创建数据结构时,用于标识它的索引值是从0开始的整数值。这意味着不同类型的数据结构可以具有相同索引值,所以如果有疑问你应该使用ds_exists访问它们之前的功能。还要注意,索引是可以被重新利用的,因此之后新创建的索引值可能会使用被破坏的数据结构索引值。


语法:

ds_map_create();


返回:

Integer (DS map ID)


例如:

inventory = ds_map_create();

The above code will create a new, empty ds_map and store its id index in the variable "inventory".